<template>
  <el-form :model="form" label-width="120px">
 
                         <JmInput jmname="名称" v-model="form.title"></JmInput>

      
                    <JmInput type="img" jmname="图片" v-model="form.imageurl"></JmInput> 



                    <JmInput jmname="连接" v-model="form.linkurl"></JmInput>
                    <JmInput type="num"  jmname="权重" v-model="form.weigh"></JmInput>
	
                    <JmInput   type="datetime"   jmname="开始时间" v-model="form.effectime"></JmInput>
 			               <JmInput type="datetime" jmname="截止时间" v-model="form.expiretime" remark="当广告位类型是3代码广告的时候使用"></JmInput>
                    
 	
                    
                    <JmEnum jmname="跳转类型" v-model="form.target" :jv="{'_blank': '跳到新页面打开',   '_self': '当前页面打开',   '_top': '在整个窗口中打开',   '_parent': '在父集框架中打开'  }" jtype="3"  ></JmEnum>
 		
                    <el-form-item>
                      <el-button type="primary" @click="onSubmit">Create</el-button>
                    </el-form-item>
 
  </el-form>
</template>
 
<script>
import JmInput from "../../../components/form/JmInput.vue";
import JmEnum from "../../../components/form/JmEnum.vue";
export default {
  components: { JmInput, JmEnum },
  data() {
    return {
         form: {
              code: "",
            createtime: "2019-03-13 11:26:49",
            effectime: "2019-03-19 17:01:20",
            expiretime: "2019-03-19 17:01:20",
            id: 11,
            imageurl: "/uploads/200311/1-200311205303493.jpg",
            linkurl: "#",
            target: "_blank",
            title: "定制",
            updatetime: "2019-03-19 17:01:20",
            weigh: 1,
            zone_id: 4,
               
            }, 
    };
  }, 
  methods: {
    onSubmit() { 
      const res = this.$api.adsadd(this.form); 
       this.$parent.$parent.$parent.$parent.handleClose();   
      console.log(res);
    },
  },
};
</script>
<style>
.demo-tabs > .el-tabs__content {
  padding: 32px;
  color: #6b778c;
  font-size: 32px;
  font-weight: 600;
}
.demo-tabs .custom-tabs-label .el-icon {
  vertical-align: middle;
}
.demo-tabs .custom-tabs-label span {
  vertical-align: middle;
  margin-left: 4px;
}
</style>